<template>
    <el-cascader v-bind="$attrs" filterable :props="props" />
</template>

<script>
export default {
    data() {
        return {
            props: {
                lazy: true,
                value: "id",
                label: "title",
                leaf: "isLeaf",
                async lazyLoad(node, resolve) {
                    const parentId = node.level === 0 ? 0 : node.data.id
                    const result = await $.get({ url: "/do/list/mate_cate", data: { parentId } })
                    resolve(result)
                },
            }
        };
    },
    created() { },
};
</script>
